home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu11 / examples.arc / EX11TEXT < prev    next >
Text File  |  1988-11-29  |  864b  |  24 lines

  1. * Program segments - not intended for assembly as is.
  2.  
  3.        LDAA  #100     Hex ($64)
  4.        NEGA           2's compliment ($9C)
  5.        STAA  PACNT    Store to pulse accum counter
  6.  
  7.  
  8.        LDD   #515     Get desired count in A:B
  9.        TSTB           Test for remainder count
  10.        BEQ   ARNINC   If none; skip the INCA
  11.        INCA           Increment the overflow count
  12. ARNINC NEGB           2's compliment remainder in B
  13.        STAB  PACNT    Store to pulse accum counter
  14.        STAA  OVCNT    Store to RAM overflow variable
  15.  
  16.  
  17.        LDD   #515     Get desired count in A:B
  18.        NEGB           C-bit only cleared if B was 0
  19.        BCC   ARNINC   If B was ($00); skip the INCA
  20.        INCA           Increment the overflow count
  21. ARNINC STAB  PACNT    Store 2's comp. remainder count
  22.        STAA  OVCNT    Store to RAM overflow variable
  23.  
  24.